﻿<controls:ChildWindow
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" x:Class="Crm.Views.AddSurvey"
           Width="800" Height="600" 
           Title="Anket Ekle">
    <Grid x:Name="LayoutRoot" Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Button x:Name="OKButton" Content="Kaydet" Click="OKButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,13,10,0" Grid.Row="1" />
        <sdk:Label HorizontalAlignment="Left" Height="23" Margin="14,27,0,0" VerticalAlignment="Top" Width="97" Content="Anket Adı" FontSize="14" FontWeight="Bold"/>
        <TextBox HorizontalAlignment="Left" Height="23" Margin="111,26,0,0" TextWrapping="Wrap" Name="txtAnketAdi" VerticalAlignment="Top" Width="302"/>
        <Border HorizontalAlignment="Left" Height="431" Margin="11,85,0,0" VerticalAlignment="Top" Width="757" BorderBrush="Black" BorderThickness="2">
            <Grid OpacityMask="Black" Margin="0">
                <Rectangle Fill="#FFA8A8B0" Height="38" VerticalAlignment="Top"/>
                <sdk:Label HorizontalAlignment="Left" Height="23" Margin="9,9,0,0" VerticalAlignment="Top" Width="97" Content="Soru Tanım" FontSize="14" FontWeight="Bold"/>
                <sdk:Label HorizontalAlignment="Left" Height="17" Margin="10,50,0,0" VerticalAlignment="Top" Width="54" FontSize="12" FontWeight="Bold" Content="Sorular"/>
                <sdk:DataGrid HorizontalAlignment="Left" Name="dataGrid" Height="345" Margin="9,72,0,0" VerticalAlignment="Top" Width="734" AutoGenerateColumns="False">
                    <sdk:DataGrid.Columns>
                        <sdk:DataGridTextColumn Header="Tanım" Binding="{Binding Tanim}" Width="400"/>
                        <sdk:DataGridTemplateColumn Header="Seçenekler" Width="100">
                            <sdk:DataGridTemplateColumn.CellTemplate>
                                <DataTemplate>
                                    <Button Name="btnEkle"  Content="Ekle" Tag="{Binding}" Height="24" Cursor="Hand" Click="btnEkle_Click_1"/>
                                </DataTemplate>
                            </sdk:DataGridTemplateColumn.CellTemplate>
                        </sdk:DataGridTemplateColumn>
                        <sdk:DataGridTemplateColumn Header="Çoklu Seçim" Width="100">
                            <sdk:DataGridTemplateColumn.CellTemplate>
                                <DataTemplate>
                                    <CheckBox Name="chkCoklu" Content="Çoklu Seçim"  Height="24" IsChecked="{Binding CokluSecim}" Cursor="Hand" />
                                </DataTemplate>
                            </sdk:DataGridTemplateColumn.CellTemplate>
                        </sdk:DataGridTemplateColumn>
                        <sdk:DataGridTemplateColumn Header="Sil" Width="40">
                        <sdk:DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                    <Button Name="btnSil" Content="Sil"  Height="24"  Cursor="Hand" Click="SoruTemizle" />
                            </DataTemplate>
                        </sdk:DataGridTemplateColumn.CellTemplate>
                        </sdk:DataGridTemplateColumn>
                    </sdk:DataGrid.Columns>
                </sdk:DataGrid>
                <Button Content="Yeni Soru Ekle" HorizontalAlignment="Left" Margin="648,45,0,0" VerticalAlignment="Top" Width="95" Click="Button_Click_1"/>
            </Grid>
        </Border>
        <CheckBox x:Name="chkGecerli" Content="Geçerli" HorizontalAlignment="Left" Margin="418,27,0,0" VerticalAlignment="Top" FontSize="12" FontWeight="Bold"/>
        <Button Content="Sil" HorizontalAlignment="Left" Margin="613,14,0,0" Grid.Row="1" VerticalAlignment="Top" Width="75" Click="Button_Click_2"/>
    </Grid>
</controls:ChildWindow>